//
//  MessageDetailView.m
//  YTwallet
//
//  Created by ZhangLin on 2019/3/7.
//  Copyright © 2019年 hadrlog. All rights reserved.
//

#import "MessageDetailView.h"
#import <Masonry.h>
@implementation MessageDetailView

-(instancetype)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
        [self setupViews];
    }
    return self;
}

-(void)setupViews{
    self.topView = [[UIView alloc] init];
    self.topView.backgroundColor = [UIColor whiteColor];
    [self addSubview:self.topView];
    [self.topView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(0);
        make.right.mas_equalTo(0);
        make.height.mas_equalTo(250);
        make.top.mas_equalTo(10);
    }];
    
    self.titleLab = [[UILabel alloc] init];
    self.titleLab.text = @"一条新通知";
    self.titleLab.font = [UIFont boldSystemFontOfSize:18];
    self.titleLab.textColor = [UIColor colorWithRed:51 / 255.0 green:51 / 255.0 blue:51 / 255.0 alpha:1];
    [self.topView addSubview:self.titleLab];
    [self.titleLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(15);
        make.top.mas_equalTo(30);
    }];
    
    self.timeLab = [[UILabel alloc] init];
    self.timeLab.text = @"今天 11-26 15:34";
    self.timeLab.font = [UIFont systemFontOfSize:12];
    self.timeLab.textColor = [UIColor colorWithRed:153 / 255.0 green:153 / 255.0 blue:153 / 255.0 alpha:1];
    [self.topView addSubview:self.timeLab];
    [self.timeLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(15);
        make.top.equalTo(self.titleLab.mas_bottom).offset(5);
    }];
    
    self.detailLab = [[UILabel alloc] init];
    self.detailLab.text = @"消息消息消息消息消息消息消息消息消息消息消息消息消息消息消息消息消息消息消息消息消息消息消息消息消息消息消息消息消息消息消息消息消息消息消息消息消息消息消息消息消息消息消息消息消息消息消息消息";
    self.detailLab.font = [UIFont systemFontOfSize:14];
    self.detailLab.numberOfLines = 0;
    self.detailLab.textColor = [UIColor colorWithRed:153 / 255.0 green:153 / 255.0 blue:153 / 255.0 alpha:1];
    [self.topView addSubview:self.detailLab];
    [self.detailLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(15);
        make.right.mas_equalTo(-15);
        make.top.equalTo(self.timeLab.mas_bottom).offset(20);
        make.bottom.mas_equalTo(-20);
    }];
    
    
}

@end
